/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.hl7.v3;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.Enumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>Patient Importance</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * <!-- begin-model-doc -->
 * vocSet: T19265 (C-0-T19265-cpt)
 * <!-- end-model-doc -->
 * @see org.hl7.v3.V3Package#getPatientImportance()
 * @model extendedMetaData="name='PatientImportance'"
 * @generated
 */
public enum PatientImportance implements Enumerator {
	/**
	 * The '<em><b>BM</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #BM_VALUE
	 * @generated
	 * @ordered
	 */
	BM(0, "BM", "BM"),

	/**
	 * The '<em><b>FD</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #FD_VALUE
	 * @generated
	 * @ordered
	 */
	FD(1, "FD", "FD"),

	/**
	 * The '<em><b>FOR</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #FOR_VALUE
	 * @generated
	 * @ordered
	 */
	FOR(2, "FOR", "FOR"),

	/**
	 * The '<em><b>GOVT</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #GOVT_VALUE
	 * @generated
	 * @ordered
	 */
	GOVT(3, "GOVT", "GOVT"),

	/**
	 * The '<em><b>DFM</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #DFM_VALUE
	 * @generated
	 * @ordered
	 */
	DFM(4, "DFM", "DFM"),

	/**
	 * The '<em><b>SFM</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #SFM_VALUE
	 * @generated
	 * @ordered
	 */
	SFM(5, "SFM", "SFM"),

	/**
	 * The '<em><b>STF</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #STF_VALUE
	 * @generated
	 * @ordered
	 */
	STF(6, "STF", "STF"),

	/**
	 * The '<em><b>DR</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #DR_VALUE
	 * @generated
	 * @ordered
	 */
	DR(7, "DR", "DR"),

	/**
	 * The '<em><b>VIP</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #VIP_VALUE
	 * @generated
	 * @ordered
	 */
	VIP(8, "VIP", "VIP");

	/**
	 * The '<em><b>BM</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>BM</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #BM
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int BM_VALUE = 0;

	/**
	 * The '<em><b>FD</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>FD</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #FD
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int FD_VALUE = 1;

	/**
	 * The '<em><b>FOR</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>FOR</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #FOR
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int FOR_VALUE = 2;

	/**
	 * The '<em><b>GOVT</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>GOVT</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #GOVT
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int GOVT_VALUE = 3;

	/**
	 * The '<em><b>DFM</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>DFM</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #DFM
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int DFM_VALUE = 4;

	/**
	 * The '<em><b>SFM</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>SFM</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #SFM
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int SFM_VALUE = 5;

	/**
	 * The '<em><b>STF</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>STF</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #STF
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int STF_VALUE = 6;

	/**
	 * The '<em><b>DR</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>DR</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #DR
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int DR_VALUE = 7;

	/**
	 * The '<em><b>VIP</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>VIP</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #VIP
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int VIP_VALUE = 8;

	/**
	 * An array of all the '<em><b>Patient Importance</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final PatientImportance[] VALUES_ARRAY =
		new PatientImportance[] {
			BM,
			FD,
			FOR,
			GOVT,
			DFM,
			SFM,
			STF,
			DR,
			VIP,
		};

	/**
	 * A public read-only list of all the '<em><b>Patient Importance</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final List<PatientImportance> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the '<em><b>Patient Importance</b></em>' literal with the specified literal value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static PatientImportance get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			PatientImportance result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Patient Importance</b></em>' literal with the specified name.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static PatientImportance getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			PatientImportance result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Patient Importance</b></em>' literal with the specified integer value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static PatientImportance get(int value) {
		switch (value) {
			case BM_VALUE: return BM;
			case FD_VALUE: return FD;
			case FOR_VALUE: return FOR;
			case GOVT_VALUE: return GOVT;
			case DFM_VALUE: return DFM;
			case SFM_VALUE: return SFM;
			case STF_VALUE: return STF;
			case DR_VALUE: return DR;
			case VIP_VALUE: return VIP;
		}
		return null;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final int value;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String name;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String literal;

	/**
	 * Only this class can construct instances.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private PatientImportance(int value, String name, String literal) {
		this.value = value;
		this.name = name;
		this.literal = literal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getValue() {
	  return value;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
	  return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLiteral() {
	  return literal;
	}

	/**
	 * Returns the literal value of the enumerator, which is its string representation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		return literal;
	}
	
} //PatientImportance
